/*
 * AvisosAction.java
 *
 * Created on 25 de febrero de 2006
 */
package org.fiel.admin.struts.actions;

import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import org.fiel.FielConstants;
//import org.fiel.torque.AvisoPeer;

/**
 * @author Luis Pablo Gallo (luispablo.gallo@gmail.com)
 */
public class AvisosAction extends FielAction{
    private Logger logger = Logger.getLogger(AvisosAction.class);
    
//    public ActionForward list   ( ActionMapping mapping
//                                , ActionForm form
//                                , HttpServletRequest request
//                                , HttpServletResponse response )
//    throws Exception{
//        try{
//            request.setAttribute(FielConstants.AVISOS, AvisoPeer.retrieve());
//        }catch (Exception ex){
//            this.logger.error("ERROR", ex);
//        }
//        
//        return mapping.findForward(this.authorize(request, FielConstants.SHOW_LIST));
//    }
//    
//    public ActionForward add( ActionMapping mapping
//                            , ActionForm form
//                            , HttpServletRequest request
//                            , HttpServletResponse response )
//    throws Exception{
//        request.setAttribute(FielConstants.EDITABLE, FielConstants.TRUE);
//        return mapping.findForward(this.authorize(request, FielConstants.ADD));
//    }
    
//
//    public ActionForward save   ( ActionMapping mapping
//                                , ActionForm form
//                                , HttpServletRequest request
//                                , HttpServletResponse response )
//    throws Exception{
//        AreaDAO dao = new AreaDAO();
//
//        if( ((AreaForm)form).getId()==null || ((AreaForm)form).getId().trim().length()<=0 ){
//            dao.create((AreaForm)form);
//        }else{
//            dao.update((AreaForm)form);
//        }
//
//        return this.list(mapping, form, request, response);
//    }
//
//    public ActionForward view   ( ActionMapping mapping
//                                , ActionForm form
//                                , HttpServletRequest request
//                                , HttpServletResponse response )
//    throws Exception{
//        AreaDAO dao = new AreaDAO();
//        AreaForm area = dao.retrieve(request.getParameter("id"));
//        
//        ((AreaForm)form).setId(area.getId());
//        ((AreaForm)form).setNombre(area.getNombre());
//        ((AreaForm)form).setOrden(area.getOrden());
//        
//        request.setAttribute( FielConstants.EDITABLE
//                            , request.getParameter(FielConstants.EDITABLE) );
//
//        return mapping.findForward(this.authorize(request, FielConstants.ADD));
//    }
//
//    public ActionForward delete ( ActionMapping mapping
//                                , ActionForm form
//                                , HttpServletRequest request
//                                , HttpServletResponse response )
//    throws Exception{
//        AreaDAO dao = new AreaDAO();
//        dao.delete(request.getParameter("id"));
//        
//        return this.list(mapping, form, request, response);
//    }
}
